<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>结算列表</title>
<#include "/view/admin/headList.html"/>
    <script type="text/javascript">

        $(function() {
            //初始化
        });
    </script>
</head>
<body>



<div class="table-class">
    <div class="panel panel-default" style="margin: 10px 10px 10px;">
     <div class="panel-body">
        <form class="bs-example bs-example-form" role="form">

            <div class="input-group">
                <span class="input-group-addon">订单号</span>
                <input type="text" id="orderNo" class="form-control" value="${entity.orderNo!}" placeholder="请输入订单号">
            </div>
                <span class="bank-label">&nbsp;</span>

            <div class="input-group">
                <span class="input-group-addon">结算类型</span>
                <select id="settleType" name="settleType"
                        class="form-control"
                >
                    <option value="">请选择结算类型</option>
                                <option value="0" <#if entity.settleType??&&0 == entity.settleType>selected="selected"</#if>>待结账</option>

                                <option value="1" <#if entity.settleType??&&1 == entity.settleType>selected="selected"</#if>>已结账</option>


                </select>

            </div>
                <span class="bank-label">&nbsp;</span>


                <div class="input-group">
                    <span class="input-group-addon">开始结算时间</span>
                    <input type="text" id="createtimeStart" class="form-control isdatetimepicker" value="<#if (entity.createtimeStart)?? >${entity.createtimeStart?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtimeStart" name="createtimeStart" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>
                <div class="input-group">
                    <span class="input-group-addon">结束结算时间</span>
                    <input type="text" id="createtimeEnd" class="form-control isdatetimepicker" value="<#if (entity.createtimeEnd)?? >${entity.createtimeEnd?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtimeEnd" name="createtimeEnd" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>






            <div class="input-group" style="text-align: right;">
                <a class="btn btn-info"  href="javascript:query('${base}/settleaccounts/list.do')"><span class="glyphicon glyphicon-search"></span> 查找</a>

            </div>
        </form>
     </div>
    </div>


    <table class="table table-hover table-list table-bordered">
        <thead>
        <tr>
            <td class="table-head-btn">
                <div style="text-align:left;margin-left: 50px;">
                    <a href="${base}/settleaccounts/add.do" class="btn btn-primary">新增</a>
                </div>
            </td>
        </tr>
        <tr class="table-head">
            <th>序号</th>
                <th class="label-hidden">主键</th>
                <th>订单号</th>
                <th>结算类型</th>
                <th>结算时间</th>
                <th>结算金额</th>
                <th>商家</th>
                <th>年</th>
                <th>月</th>

            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <#list pagination.list as c>
            <tr>
                <td>${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td>
                        <td class="label-hidden">${c.settleaccountsId!}</td>
                            <td>${c.orderNo!}</td>

                        <td> 
                            <#if c.settleType??>
                                        <#if c.settleType==0>待结账
                                        <#elseif c.settleType==1>已结账
                                        </#if>

                            </#if>
                        </td>
                        <td><#if c.createtime?? >${c.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                            <td>${c.settlementAmount!}</td>

                            <td>${c.businessId!}</td>

                            <td>${c.year!}</td>

                            <td>${c.month!}</td>


                <td>
                    <a href="${base}/settleaccounts/detail.do?settleaccountsId=${c.settleaccountsId!}" class="btn btn-primary">详情</a>
                    <a href="${base}/settleaccounts/add.do?settleaccountsId=${c.settleaccountsId!}" class="btn btn-primary">修改</a>
                    <a href="javascript:checkDelete('${base}/settleaccounts/delete.do?settleaccountsId=${c.settleaccountsId!}')" class="btn btn-primary">删除</a>
                </td>
            </tr>








        </#list>
        </tbody>
    </table>


</div>
<script>

    function queryCondition(){
        var href="";
            href+='orderNo='+$('#orderNo').val();
                href+='&';
            href+='settleType='+$('#settleType').val();
                href+='&';
            href+='createtimeStart='+$('#createtimeStart').val()+"&";
            href+='createtimeEnd='+$('#createtimeEnd').val();
        return href;
    }

</script>

</body>
</html>
